<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<html>
<head>
<title>我的订单</title>
<link href="${ctxStatic }/xiake/css/list.css" rel='stylesheet' type='text/css' />

	<meta name="decorator" content="front"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
	</script>
</head>
<body>
	<div class="container font_normal_size"> 
		<c:set var="siderMenuName" value="我的订单"/>
		<%@ include file="/WEB-INF/views/modules/base/siderMenu.jsp"%>
		<div class="order_table">
			<form id="searchForm" action="${ctxFront}/orders/orderList" method="post">
				<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
				<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
				<div class="order_table_p"> 
					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
					<label>订单号&nbsp;&nbsp;</label>
					<input name="orderid" class="order_table_n" type="text" value="${orders.orderid }"/>
					<label>预定日期&nbsp;&nbsp;</label>
					<input type="text" id="createDateQueryStart" name="createDateQueryStart" maxlength="20" readonly class="order_table_s Wdate"
						value="${orders.createDateQueryStart }"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,maxDate:'#F{$dp.$D(\'createDateQueryEnd\')}'});"/>
						 - <input type="text" id="createDateQueryEnd" name="createDateQueryEnd" maxlength="20" readonly class="order_table_s Wdate"
						value="${orders.createDateQueryEnd }"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,minDate:'#F{$dp.$D(\'createDateQueryStart\')}'});"/>
					<div class="order_table_z pointer inquiry" onclick="$('#searchForm').submit();">查询</div>
				</div>
								<div class="order_table_p"> </div>
				<table>
					<tr>
						<th class="order_table_col1">订单号码</th>
						<th>
							<select name="ordertype" style="min-width:140px;background-color: #D5D5D5 !important;">
								<option value="">全部类型</option>
								<option value="${ORDER_TYPE_RENTPRODUCT_DAY }" ${orders.ordertype == ORDER_TYPE_RENTPRODUCT_DAY?'selected':'' }>按天包车</option>
								<option value="${ORDER_TYPE_RENTPRODUCT_TRAVEL }" ${orders.ordertype == ORDER_TYPE_RENTPRODUCT_TRAVEL?'selected':'' }>旅游包车</option>
								<option value="${ORDER_TYPE_RENTPRODUCT_TRAIN }" ${orders.ordertype == ORDER_TYPE_RENTPRODUCT_TRAIN?'selected':'' }>接送火车</option>
								<option value="${ORDER_TYPE_RENTPRODUCT_AIRPLANE }" ${orders.ordertype == ORDER_TYPE_RENTPRODUCT_AIRPLANE?'selected':'' }>接送飞机</option>
								<option value="${ORDER_TYPE_RENTPRODUCT_CUSTOM }" ${orders.ordertype == ORDER_TYPE_RENTPRODUCT_CUSTOM?'selected':'' }>定制包车</option>
								<option value="${ORDER_TYPE_REALSCHE_SELF_TRAVEL }" ${orders.ordertype == ORDER_TYPE_REALSCHE_SELF_TRAVEL?'selected':'' }>景区直通车</option>
							</select>
						</th>
						<th>行程/有效期</th>
						<th>总金额</th>
						<th>订单状态
							<select name="orderstatus" style="min-width:100px">
								<option value="">全部</option>
								<option value="${TORDERS_STATUS_NO_PAY }" ${orders.orderstatus == TORDERS_STATUS_NO_PAY?'selected':'' }>未支付</option>
								<option value="${TORDERS_STATUS_PAY }" ${orders.orderstatus == TORDERS_STATUS_PAY?'selected':'' }>已支付</option>
								<option value="${TORDERS_STATUS_BACK }" ${orders.orderstatus == TORDERS_STATUS_BACK?'selected':'' }>已取消</option>
								<option value="${TORDERS_STATUS_CANCEL }" ${orders.orderstatus == TORDERS_STATUS_CANCEL?'selected':'' }>已作废</option>
							</select>
						</th>
						<th>操作</th>
					</tr>
					<c:forEach items="${page.list}" var="orders">
						<tr>
							<td class="order_table_lin1" colspan="6">
								<div>
									<span class="order_table_col1">订单号：${orders.orderid}</span>
									<span class="float_r">预定日期：<fmt:formatDate value="${orders.createDate }" pattern="yyyy-MM-dd HH:mm:ss"/></span>
									<%-- <span><a href="${ctxFront }/orders/del?orderid=${orders.orderid}">删除订单</a></span> --%>
								</div>
							</td>
						</tr>
						<tr class="order_table_lin2">	
							<td class="order_table_col1 order_table_col1_f" colspan="2">
								${orders.ordername }
							</td>
							<td><fmt:formatDate value="${orders.departdate }" pattern="yyyy-MM-dd HH:mm"/></td>
							<td>￥${orders.dueamount}</td>
							<td>
								<c:if test="${orders.orderstatus == TORDERS_STATUS_PAY}">已支付</c:if>
								<c:if test="${orders.orderstatus == TORDERS_STATUS_NO_PAY}">未支付</c:if>
								<c:if test="${orders.orderstatus == TORDERS_STATUS_BACK}">
									已取消<c:if test="${orders.settlereason == '5'}">（更换车队）</c:if>
								</c:if>
								<c:if test="${orders.orderstatus == TORDERS_STATUS_CANCEL}">已作废</c:if>
							</td>
							<td class="order_table_col1_r">
								<c:if test="${orders.orderstatus == TORDERS_STATUS_NO_PAY}">
									<div class=""><a href="${ctxFront}/pay/payWay?orderid=${orders.orderid}&boardaddrfc=${orders.realscheOff.siteid }&offaddrfc=${orders.realscheBoard.siteid }">支付</a></div>&nbsp;
									<div class=""><a href="${ctxFront}/pay/cancel?orderid=${orders.orderid}">取消订单</a></div>
								</c:if>
								<c:if test="${orders.orderstatus == TORDERS_STATUS_PAY}">
									<c:if test="${orders.ordertype == ORDER_TYPE_REALSCHE_SELF_TRAVEL}">
										<div class=""><a href="${ctxFront}/realsche/backMoney?orderid=${orders.orderid}">退票</a></div>
									</c:if>
									<c:if test="${orders.ordertype ne ORDER_TYPE_REALSCHE_SELF_TRAVEL}">
										<div class=""><a href="${ctxFront}/pay/backMoney?orderid=${orders.orderid}">退票</a></div>
									</c:if>
								</c:if>
								<div class=""><a href="${ctxFront}/orders/orderDetail?orderid=${orders.orderid}" target="_blank">查看</a></div>
							</td>
						</tr>
					</c:forEach>
				</table>
			</form>
			<div style="text-align: center;">
				<div class="pagination  font_normal_size" >${page.html}</div>
			</div>
		</div>
	</div>
</body>
</html>